BINARY_DIR=output
clean:
	rm -rf $(BINARY_DIR)
lint:
	golangci-lint run
build:
	# node_modules/.bin/ionic build --prod --engine=browser --platform=ios
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $(BINARY_DIR)/pp_linux cmd/pp/main.go
	CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o $(BINARY_DIR)/pp_macos cmd/pp/main.go
	CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o $(BINARY_DIR)/pp_windows.exe cmd/pp/main.go
proto:
	protoc --go_out=plugins=grpc:. doc/*.proto
	# protoc --gofast_out=plugins=grpc:. doc/*.proto
# protojs:
# 	node_modules/.bin/pbjs -t static-module -w commonjs -o src/pb.js doc/*.proto
# 	node_modules/.bin/pbts -o src/pb.d.ts src/pb.js
mock:
	mockgen -source=./nets/udp_conn.go -destination=./nets/udp_conn_mock_test.go --package=nets_test
	mockgen -source=./nets/udp.go -destination=./nets/udp_mock_test.go --package=nets_test
	mockgen -source=./robot/robot.go -destination=./robot/robot_mock_test.go --package=robot_test
